﻿using mozhi.smarterp.Business.Purchases;
using mozhi.smarterp.Business.Purchases.Repositories;
using Mozhi.Abp.Core.Networks;
using Mozhi.Abp.Infrastructure.RemoteRepositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mozhi.smarterp.Business.RemoteRepositories.Purchases
{
    public class PurchaseReceiptPayableRepository : RemoteRepository<PurchaseReceiptPayable>, IPurchaseReceiptPayableRepository
    {
        public PurchaseReceiptPayableRepository(IRemoteServiceClient remoteServiceClient) : base(remoteServiceClient, "Finance","api/v1/account-payables/recepits")
        {
        }

        public async Task<int> GetCountAsync(Guid receiptId)
        {
            var url = _url + "?receiptId=" + receiptId;

            var count = await _remoteServiceClient.GetAsync<int>(_serviceName, url);

            return count;
        }

        public Task<List<PurchaseReceiptPayable>> GetListAsync(Guid receiptId)
        {
            throw new NotImplementedException();
        }
    }
}
